/*
 * @lc app=leetcode.cn id=73 lang=golang
 *
 * [73] 矩阵置零
 */

// @lc code=start
func setZeroes(matrix [][]int)  {
    m, n := len(matrix), len(matrix[0])
	cols, rows := make([]bool, m, m), make([]bool, n, n)
	for i:=0;i<m;i++{
		for j:=0;j<n;j++{
			if matrix[i][j] == 0 {
				cols[i] = true
				rows[j] = true
			}
		}
	}

	for i:=0;i<m;i++{
		for j:=0;j<n;j++{
			if cols[i] || rows[j] {
				matrix[i][j] = 0
			}
		}
	}
}
// @lc code=end

